package com.miniprogram.common.enums;

public enum FolderEnum {

    INDEX_BANNER("index/banner", "首页banner图的图片"),
    HOUSE_FACILITIES("house/facilities", "房屋的设施类别图片"),
    HOUSE_STRUCTURE_INFO("house/structureinfo", "房屋的构造类别图片"),
    HOUSE_GOODS_INFO("house/goodsinfo", "房屋的物品图片"),
    HOUSE_RECOMMEND("house/recommend", "推荐房屋的图片"),
    ;

    private String name;

    private String description;

    private static final String folderPath = "jmkj";

    FolderEnum(String name, String description) {
        this.name = name;
        this.description = description;
    }

    public String getFolderName() {
        return folderPath + "/" + name + "/";
    }

    public String getName() {
        return name;
    }

    public String getDescription() {
        return description;
    }

    @Override
    public String toString() {
        return name;
    }

    public static FolderEnum ValueOfName(String name) {
        for (FolderEnum folderEnum : FolderEnum.values()) {
            if (folderEnum.name.equals(name)) {
                return folderEnum;
            }
        }
        return null;
    }

}
